extends Control

## 只要是左边图像右边数量都可以使用

@export var maxNum = 5
@export var nowNum = 0

@onready var label = $Label

func _ready():
	label.text = str(nowNum)
	
	
func add():
	self.nowNum += 1
	label.text = str(self.nowNum)
	
	
func sub():
	self.nowNum -= 1
	label.text = str(self.nowNum)


func addX(x):
	self.nowNum += x
	label.text = str(self.nowNum)
	
	
func subX(x):
	self.nowNum -= x
	label.text = str(self.nowNum)
	
func getNum():
	return self.nowNum
